<?php
    /**
     * Created by PhpStorm.
     * User: walker
     * Date: 2019/1/12 0012
     * Time: 17:34
     */
    function fprint($arg)
    {
        echo "<pre>";
        print_r($arg);
        die;
    }

    function ajaxReturn($code, $msg, $data = [])
    {
        header('content-type:application/json;charset=utf-8');
        $res = [
            'code' => $code,
            'msg'  => $msg,
            'data' => $data,
        ];
        echo json_encode($res, true);
    }